<template>
  <div class="">
   <header>
      <div class="top">
            <p @click="fanhui">返回  </p>
            <h1>我的收藏</h1>
      </div>
      <div>
           ❌
      </div>
   </header>
       <div class="cotent" v-for="(item,index) in list" :key="index">
          <img :src="item.picUrl" alt="">
          <div>
              <p>{{item.name}}</p>
              <div>
                <p>☆4.5  {{item.monthSalesTip}}</p>
                 <p>商家配送</p>
              </div>
              <div>
                  <p>{{item.minPriceTip}} {{item.shippingFeeTip}}</p>
              </div>
          </div>


    </div>
          <!-- <div class="empty" v-show="list.length == 0">大哥，收藏点东西吧！</div> -->
  </div>
</template>
<script>

import {shopfavlist} from "../../api/index"
export default {
    data() {
        return {
            list:[]
        }
    },
  methods: {
    fanhui(){
    
      this.$router.go(-1);
    }
    
  },
  mounted(){
       shopfavlist({userid:localStorage.getItem("userid") }).then((res)=>{
      console.log(res.data.list);
      this.list=res.data.list
    })
   
    
  },
}
</script>

<style scoped>
header{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
 .cotent{
  display: flex;
  width: 100%;
  font-size: 1px;
 }
  .cotent img{
    width: 30%;
    height: 100%;
  }
.empty{
  font-size:50px ;
  text-align: center;
  line-height: 500px;
  color: red;
  
}
.top{
  display: flex;
    align-items: center;
}


</style>
